Introduction:

There are numerous options for installing the ArcGIS API for Python. Refer to the ArcGIS Developers Website Get Started documentation to find out more on each option. GeoDev HackerLabs will use the Anaconda Distribution as its method of install and instruction.

Continuum Analystics' Anaconda is a comprehensive Python (and R) package management system comprising more than 100 packages plus mechanisms for installing hundreds of open source packages accessed from various repositories called Channels. Channels may be a default set of cloud locations, such as Anaconda Cloud, or private repositories created by individuals or organizations.

Install Anaconda

Navigate to the Anaconda Download page and proceed with installation of the appropriate software for your Operating System.

Once installed, interaction with the Anaconda installation primarily occurs through its command-line tool called conda. Conda manages packages and dependencies so they don't interfere with each other through a mechanism called an environment, which is a folder or directory with a specific collection of packages and their dependencies. Core python and other default packages are installed into the default environment, named root. You can choose to keep this core environment isolated and untouched, or install additional packages into the environment before creating environments of your own. Refer to the core conda documentation for instructions on managing environments.

Create an environment with this command:

conda create --name gis-enviro

Name the environment how you want.

Install the ArcGIS API for Python

Esri distributes the ArcGIS Python API in a conda package called arcgis accessible at Esri's channel named esri. Install the arcgis package with the following command. Additional packages, including 'jupyter' (mentioned below), get installed with the arcgis package.

conda install --name gis-enviro -c esri arcgis

NOTE: if you do not enter an environment name, the package installs into the root environment.

Activate the environment to access it.

See topic at Changing Environments for specific commands based on your OS.

In Mac OS X:

source activate gis-enviro

The ArcGIS API for Python integrates with the Jupyter Notebook. See Jupyter Documentation for more about the Jupyter suite of software and tools.

Start the Jupyter Notebook

Navigate to the directory where you want to create notebooks (or where notebooks already exist).

jupyter notebook

If installed correctly, you'll see messages indicating that a web server has started. Your default web browser will launch from your current directory.

Full documentation including samples and an API Reference located at https://developers.arcgis.com/python.